查詢運算式以斜體表示。
範例: %rating% GREATER 3
查詢範列可能包含在加框角括弧中的預留位置。在查詢中取代為有實際意義的名稱。如果在範列中有多個同一類型預留位置,在預留位置後將會附加數字到該名稱。
範例: <field> GREATER <number>
在文字文件其餘部分中使用以下通用類型的預留位置:
<field>
標籤欄位參照。這可以是一個普通的欄位名稱或標題格式化運算。請參閱
附註 詳細資料。
<number>
一個整數值。
<string>
可以被包含在雙引號的文字值。請參閱
附註 詳細資料。
<time>
時間值或標題格式化運算式,計算結果為一個時間值。請參閱
時間運算式 詳細資料。
<expression>
查詢運算式組成的查詢。遵照的規則描述請參閱
進階搜尋 如下。
簡單查詢模式不使用任何關鍵字。
When using the simple search, any latin characters are matched regardless of their accents, e.g. “foo” will match “foo” as well as “föö” or “fóo”.
The advanced search allows the construction of more complex queries. It offers several keywords to perform specific types of comparisons and to combine multiple query expressions.
<field> HAS <string>
Returns only items that have all words from <string> in a metadata field named <field>.
範例: title HAS blah
<field> IS <string>
Returns only items where (at least one) metadata field <field> is equal to <string>.
範例: artist IS blah
* HAS <string>
Same as simple search, but can be combined using logical operators (see below).
Perform integral number comparison between the value of a <field> and a <number>, e.g. ”%rating% GREATER 3”.
<field> GREATER <number>
<field> LESS <number>
<field> EQUAL <number>
<time1> BEFORE <time2>
只傳回項目 <time1> value is before <time2>.
範例: %last_modified% BEFORE 2008
<time1> AFTER <time2>
只傳回項目 <time1> value is after <time2>.
範例: %last_modified% AFTER 2008
<time1> SINCE <time2>
只傳回項目 <time1> value is not before <time2>.
範例: %last_modified% SINCE 2007
<time1> DURING <time2>
只傳回項目 <time1> value is a subset of <time2> period.
範例: %last_modified% DURING 2007
<time> DURING LAST <number> <time-unit>
傳回項目 <time> value is contained in the specified period.
<time-unit> can be one of SECONDS, MINUTES, HOURS, DAYS, or WEEKS.
範例: %last_modified% DURING LAST 2 WEEKS
If <number> is 1, the expression can be simplified to <time> DURING LAST SECOND/MINUTE/HOUR/DAY/WEEK
Time values used in these expressions must be in one of the following formats: YYYY, YYYY-MM, YYYY-MM-DD, YYYY-MM-DD hh, YYYY-MM-DD hh:mm, YYYY-MM-DD hh:mm:ss.
<expression1> AND <expression2>
Returns only items where both expressions are true.
範例: artist IS blah AND title HAS blah
<expression1> OR <expression2>
Returns only items where at least one expression is true.
NOT <expression>
Returns only items where the expression is false.
範例: NOT %last_played% AFTER %first_played%
You can put a SORT BY operator at the end of your search expression to produce search results sorted by the specified title formatting pattern.
SORT BY <sort-pattern>, SORT ASCENDING BY <sort-pattern>
Sort results in ascending order.
SORT DESCENDING BY <sort-pattern>
Sort results in descending order.
<field> and <string> in HAS and IS expressions should be enclosed in double quotation marks (”) if they include spaces or parentheses.
If
<field> in
HAS,
IS,
GREATER,
LESS,
EQUAL includes at least one of #$% characters, it will be treated as a title formatting string.
範例:
%codec% IS MP3
If <field> in HAS, IS, GREATER, LESS, EQUAL does not include any of #$% characters, it will be treated as a metadata field.
範例: artist IS Radiohead
Note that you can't access technical information (such as codec specifications) or component-provided information (playback statistics and such) this way.
Using title formatting strings instead of simple field names will decrease search speed on large libraries and break multiple field value handling in the IS operator - for example, a track with two artist names: “name1” and “name2”, will be found by artist IS name1 query, but not by %artist% IS name1.
為了控制評估順序組成的查詢,附上個別括弧中的運算式。
範例: ( (artist IS blah) AND (title HAS blah) ) OR (%rating% GREATER 3)
所有搜尋運算式沒有區分大小寫。所有關鍵字必須為大寫。
| 作業 | 語法 | 註解 |
| AFTER | <time1> AFTER <time2> | |
| AND | <expression1> AND <expression2> | |
| BEFORE | <time1> BEFORE <time2> | |
| DURING | <time1> DURING <time2> | |
| DURING LAST | <time> DURING LAST <number> SECONDS/MINUTES/HOURS/DAYS/WEEKS
<time> DURING LAST SECOND/MINUTE/HOUR/DAY/WEEK | |
| EQUAL | <field> EQUAL <number> | |
| GREATER | <field> GREATER <number> | |
| HAS | <field> HAS <string>
* HAS <string> | |
| IS | <field> IS <string> | |
| LESS | <field> LESS <number> | |
| MISSING | <field> MISSING | |
| NOT | NOT <expression> | |
| OR | <expression1> OR <expression2> | |
| PRESENT | <field> PRESENT | |
| SINCE | <time1> SINCE <time2> | |
| SORT BY | SORT BY <sort-pattern>
SORT DESCENDING BY <sort-pattern> | 必須在查詢的結尾。 |